package modell;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Id;

@Entity
@Table(name="TB_PERIODO")
public class Periodo {
	
	public Periodo(){}

	public Periodo(String mes, modell.Obra obra, Date dataCadastro) {
		super();
		Mes = mes;
		Obra = obra;
		DataCadastro = dataCadastro;
	}


	@Id
	@GeneratedValue
	private int Id;
	
	@Column(name="PRD_MES", nullable=false, length=60)
	private String Mes;
	
	@ManyToOne
	@JoinColumn(name="ID_Obra", nullable=false)
	private Obra Obra;
	
	@Column(name = "CON_DTCADASTRO", nullable = false)
	private Date DataCadastro;
	
	public Date getDataCadastro() {
		return DataCadastro;
	}

	public void setDataCadastro(Date dataCadastro) {
		DataCadastro = dataCadastro;
	}

	public Obra getObra() {
		return Obra;
	}

	public void setObra(Obra obra) {
		Obra = obra;
	}

	public int getId() {
		return Id;
	}
	public void setId(int id) {
		Id = id;
	}
	public String getMes() {
		return Mes;
	}
	public void setMes(String mes) {
		Mes = mes;
	}
}
